import path from 'path';
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      '@': path.join(__dirname, 'src'),
    },
  },
  server: {
    port: 9527,
    proxy: {
      '/InvestmentAssistant': {
        target: 'https://dev.meix.com/',
        changeOrigin: true,
        secure: false,
      },
      '/iaweb/login': {
        target: 'https://dev.meix.com/',
        changeOrigin: true,
        secure: false,
      },
      '/iaweb/forword/all': {
        target: 'https://dev.meix.com/',
        changeOrigin: true,
        secure: false,
      },
      '/iaweb': {
        target: 'https://dev.meix.com/',
        changeOrigin: true,
        secure: false,
      }
    },
  },
  plugins: [react()],
})
